package com.taotao.usercoupon.controller;
import com.taotao.common.core.domain.Result;
import com.taotao.coupon.domain.UserCoupon;
import com.taotao.usercoupon.service.UserCouponService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
  *@ClassName UserCouponController
  *@Description 描述
  *@Author ChangLe.Liu
  *@Date 2025/1/14 19:54
 */
@RestController
@RequestMapping("/usercoupon")
public class UserCouponController {
    @Autowired
    private UserCouponService userCouponService;

    /**
     * 用户优惠卷列表
     * @param status
     * @return
     */
    @GetMapping("/userCouponsList/{status}")
    public Result<List<UserCoupon>> userCouponsList(@PathVariable Integer status){
        List<UserCoupon> userCouponsList = userCouponService.userCouponsList(status);
        Result<List<UserCoupon>> result = Result.success(userCouponsList);
        return result;
    }
}
